Marker Interfaces
A marker interface is an interface with little or no behavioral methods that communicates metadata or capability about a type. Java's Serializable is the classic example. Marker interfaces are not automatically an anti-pattern. They can be appropriate when the type system itself needs to express a capability that framework or runtime behavior can inspect. However, if the information is purely metadata and does not benefit from type checking or polymorphic use, annotations or attributes may be a better choice.
Marker interfaces communicate a type-level capability or metadata.
Serializable is a well-known Java example.
They provide compile-time type information that annotations may not provide in the same way.
They can be useful when APIs need to accept only marked types.
They become questionable when they are used only as arbitrary metadata without type-system value.
Modern designs may prefer annotations/attributes for descriptive metadata.